import request from '@/utils/request'

export function getMenuPages(data) {
    return request({
      url: '/sys-menu',
      method: 'get',
      params: data
    })
  }
  
  export function addMenu(data) {
    return request({
      url: '/sys-menu',
      method: 'post',
      data
    })
  }
  
  
  export function updateMenu(id, data) {
    return request({
      url: `/sys-menu/${id}`,
      method: 'put',
      data
    })
  }
  
  export function deleteMenu(id) {
    return request({
      url: `/sys-menu/${id}`,
      method: 'delete'
    })
  }


  export function menuTree() {
    return request({
      url: `/sys-menu/tree`,
      method: 'get'
    })
  }